PUT /cornerstone/admin/articles/:id
763453
def update
      @article = Article.find(params[:id])
      if @article.update_attributes(params[:article])
        flash[:notice] = 'Article was successfully updated.'
      else
        @categories = Category.articles
      end
      respond_with(:admin, @article)
    end
92723
def _set_id(infos):
    '''
    
    '''
    if infos:
        cid = None
        if infos.get("Id"): cid = infos["Id"]
        elif infos.get("ID"): cid = infos["ID"]
        elif infos.get("id"): cid = infos["id"]
        if "Id" not in infos:
            infos["Id"] = cid
        infos.pop("id",None)
        infos.pop("ID",None)
    return infos
402698
function(backend, name, options) {
        options = _.extend({keyPath: 'id'}, options || {});
        this.options = options;

        this.backend = backend;
        this.name = name;
        this.keyPath = this.options.keyPath;
    }
655424
public function setId( $id )
	{
		if ( $id === null ) {
			$this->_modified = true;
		}

		$this->_values['id'] = $id;
	}
634725
function editDomain($id, $returnPathDomain = NULL) {

		$body = array();
		$body['returnPathDomain'] = $returnPathDomain;

		return new DynamicResponseModel($this->processRestRequest('PUT', "/domains/$id", $body));
	}
1359123
def set_site_id(site_id)
      send_message(Protocol::Device::SetSite.new(site: [site_id].pack('H*')))
    end
914737
def help_center_article_translation_update(self, article_id, locale, data, **kwargs):
        ""
        api_path = "/api/v2/help_center/articles/{article_id}/translations/{locale}.json"
        api_path = api_path.format(article_id=article_id, locale=locale)
        return self.call(api_path, method="PUT", data=data, **kwargs)
374098
private void putId() {
        // note: name and info may be null
        super.put("Provider.id name", String.valueOf(name));
        super.put("Provider.id version", String.valueOf(version));
        super.put("Provider.id info", String.valueOf(info));
        super.put("Provider.id className", this.getClass().getName());
    }
198723
public function save_post( $post_id ) {

		if (
			empty( $_POST['rock-layout-nonce'] )
			||
			! wp_verify_nonce( $_POST['rock-layout-nonce'], basename( __FILE__ ) )
		) {

			return;

		}

		$override = ! empty( $_POST['rock-layout-override'] );
		$current  = $this->get_post_layout( $post_id );

		if ( ! $override && $current ) {

			delete_post_meta( $post_id, 'rock_layout' );

			return;

		}

		$layout = isset( $_POST['rock-layout'] ) ? sanitize_key( $_POST['rock-layout'] ) : null;

		if ( ! $override || ! $this->layout_exists( $layout ) || $layout === $current ) {

			return;

		}

		update_post_meta( $post_id, 'rock_layout', $layout );

	}
583741
protected void setId(String id) {
		if (!StringUtils.hasText(id)) {
			id = null;
		}
		this.id = id;
	}
530918
def bulk_update
      notice = Post.bulk_update params, 'posts'

      respond_to do |format|
        format.html { redirect_to admin_articles_path, notice: notice }
      end
    end
93437
protected function assignId()
    {
        list($vendor, $package) = explode('/', $this->name);
        $package = str_replace(['flarum-ext-', 'flarum-'], '', $package);
        $this->id = "$vendor-$package";
    }
948345
def update(id):
    """"""
    post = get_post(id)

    if request.method == "POST":
        title = request.form["title"]
        body = request.form["body"]
        error = None

        if not title:
            error = "Title is required."

        if error is not None:
            flash(error)
        else:
            post.title = title
            post.body = body
            db.session.commit()
            return redirect(url_for("blog.index"))

    return render_template("blog/update.html", post=post)
154561
def add_entry(id, title, updated, link, options={})
      entries << {
        :id => id,
        :title => title,
        :updated => updated,
        :link => link
        }.merge(options)
    end
764855
function(title_id, array) {
		var used = [title_id];

		// establish which IDs are assigned and if any appear twice, clear out successors.
		for (var i = 0; i < array.length; i++) {
			if (TL.Util.trim(array[i].unique_id)) {
				array[i].unique_id = TL.Util.slugify(array[i].unique_id); // enforce valid
				if (used.indexOf(array[i].unique_id) == -1) {
					used.push(array[i].unique_id);
				} else { // it was already used, wipe it out
					array[i].unique_id = '';
				}
			}
		};

		if (used.length != (array.length + 1)) {
			// at least some are yet to be assigned
			for (var i = 0; i < array.length; i++) {
				if (!array[i].unique_id) {
					// use the headline for the unique ID if it's available
					var slug = (array[i].text) ? TL.Util.slugify(array[i].text.headline) : null;
					if (!slug) {
						slug = TL.Util.unique_ID(6); // or generate a random ID
					}
					if (used.indexOf(slug) != -1) {
						slug = slug + '-' + i; // use the index to get a unique ID.
					}
					used.push(slug);
					array[i].unique_id = slug;
				}
			}
		}
	}
1116289
def put(self, **kwargs):
        
        required_args = ['id']
        check_required_args(required_args, kwargs)

        return self._put('components/groups/%s' % kwargs['id'], data=kwargs)
855047
function mountById($id)
    {
        $db = new Db();

        if ($this->where != false || $this->where != '') {
            $where = ' AND '.$this->where;
        }

        $res = $db->query('SELECT * FROM '.$this->table.' WHERE id = :id '.$where, [':id'=>0 + $id]);

        if (isset($res[0])) {
            $this->load($res[0]->getAll());

            //Access counter
            $db->query('UPDATE article
                           SET access = access + 1                               
                         WHERE id = '.$this->id);
            return $this;
        }
        return false;
    }